home *** CD-ROM | disk | FTP | other *** search
MarxMenu script | 1992-05-18 | 4.0 KB | 168 lines |
- Comment
- ==========================================================
-
- Copyright 1992 by Marc Perkel * All right reserved.
-
- This program dumps the bindery to the screen, printer or file. It is
- written in MarxMenu.
-
- =========================================================
- EndComment
-
-
- Var
- Objects
- Obj
- Prop
- Ty
- Values
- ObjStatic
- PropType
- PropStatic
- TypeName
- TypeNumber
-
- Qualifier
- ObjName
- ObjType
-
-
- OutFile = ParamStr(2)
-
- StandardIO
-
- if OutFile = ''
- Writeln
- Writeln 'Computer Tyme BindDump * Copyright 1992 by Marc Perkel'
- Writeln 'All Rights Reserved * Version 1.0 * Release Date: 05-18-92'
- Writeln
- Writeln 'Computer Tyme * 411 North Sherman, Suite 300 * Springfield Mo. 65802'
- Writeln '(800) 548-5353 Sales * (417) 866-1222 Voice * (417) 866-1665 Data'
- Writeln
- Writeln 'This utility will dump the contents of the NetWare bindery to a'
- Writeln 'file or printer.'
- Writeln
- Writeln 'USAGE: BINDDUMP <file>
- Writeln
- Writeln 'Example:'
- Writeln ' BINDDUMP BINDARY.TXT ;output to file
- Writeln ' BINDDUMP PRN ;to print bindary
- Writeln
- Writeln 'Price $50 per customer. Unlimited Servers.'
- Writeln 'Written in MarxMenu. Comes free with the Network Survival Kit.'
- exitmenu
- endif
-
- NovObjects (Objects)
-
- SetTypeNames
-
- Main
-
-
- Procedure Main
- var St ObjSecurity PropSecurity
- Loop Objects
- Obj = Objects[LoopIndex].ObjName
- Ty = Objects[LoopIndex].ObjType
- ObjSecurity = NovObjectSecurity (Obj,Ty)
- if NovStaticObject (Obj, Ty)
- ObjStatic = 'Static '
- else
- ObjStatic = 'Dynamic '
- endif
- Write PadName(Obj,31) 'Type: ' PadName(ObjType(Ty),10)
- Write ' Write: ' ObjSecurity / 16 ' Read: ' ObjSecurity and 15
- Writeln ' ' ObjStatic
- Writeln
- NovScanProperties (Prop,Obj,Ty)
- Loop Prop
- PropSecurity = NovPropertySecurity (Obj,Prop[LoopIndex],Ty)
- if NovSetProperty (Obj, Prop[LoopIndex],Ty)
- PropType = 'SET '
- else
- PropType = 'ITEM '
- endif
- if NovStaticProperty (Obj, Prop[LoopIndex],Ty)
- PropStatic = 'Static '
- else
- PropStatic = 'Dynamic '
- endif
- Write PadName(' ' + Prop[LoopIndex],31) 'Type: ' PropType
- Write ' Write: ' PropSecurity / 16 ' Read: ' PropSecurity and 15
- Writeln ' ' PropStatic
- Writeln
- if NovSetProperty (Obj, Prop[LoopIndex],Ty)
- NovPropertyValues(Values,Obj,Prop[LoopIndex],Ty)
- Loop Values
- Writeln ' ' Values[LoopIndex]
- EndLoop
- else
- NovPropertyValues(Values,Obj,Prop[LoopIndex],Ty)
- Loop Values
- DumpString(Values[LoopIndex])
- if LoopIndex < NumberOfElements(Values) then Writeln
- EndLoop
- endif
- Writeln
- EndLoop
- Writeln
- EndLoop
- EndProc
-
-
- Procedure PadName (St L)
- while length(St) < L
- St = St + ' '
- endwhile
- Return St
- EndProc
-
-
- Procedure SetTypeNames
- AppendArray(TypeName,'user')
- AppendArray(TypeName,'group')
- AppendArray(TypeName,'queue')
- AppendArray(TypeName,'server')
-
- AppendArray(TypeNumber,'1')
- AppendArray(TypeNumber,'2')
- AppendArray(TypeNumber,'3')
- AppendArray(TypeNumber,'4')
- EndProc
-
-
- Procedure ObjType (Ty)
- var P St
- Ty = Str(Ty)
- P = PosInList(Ty,TypeNumber)
- if P > 0
- St = TypeName[P]
- else
- St = Ty
- endif
- Return '(' + St + ')'
- EndProc
-
-
-
-
- Procedure DumpString (St)
- var X St2 Ch
- Loop 8
- Write ' '
- St2 = ''
- Loop 16
- X = X + 1
- Ch = Mid(St,X,1)
- Write HexString(ord(Ch),2) ' '
- if (Ch >= ' ') and (Ch <= '~')
- St2 = St2 + Ch
- else
- St2 = St2 + '.'
- endif
- endloop
- Writeln ' ' St2
- endloop
- EndProc